Stop ns builds polluting the environment with EMACSDATA, EMACSDOC
authorGlenn Morris <rgm@gnu.org>
Mon, 9 Jul 2012 07:07:24 +0000 (00:07 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 9 Jul 2012 07:07:24 +0000 (00:07 -0700)
commitc47dea83be46eb74eebfc108dc8e99b98311beee
tree40e046575892532969e176595d8db63ff5f8f03e
parent8edb600dfb4a4342c1afab7d1df7cb889ec0f1fa
Stop ns builds polluting the environment with EMACSDATA, EMACSDOC

It's bad form for one part of a program to communicate with another
part by making persistent changes to the environment of all subsequent
child processes.  For example, it can cause odd bugs when building
Emacs from within Emacs (eg bug#6401, maybe).

* nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
(ns_init_paths): Do not set EMACSDATA, EMACSDOC.
* nsterm.h (ns_etc_directory): Add it.
* callproc.c [HAVE_NS]: Include nsterm.h.
(init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
src/ChangeLog
src/callproc.c
src/nsterm.h
src/nsterm.m